local zhuiming = fk.CreateSkill {
  name = "zhuiming",
}

zhuiming:addEffect(fk.TargetSpecified, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(self) and data.card.trueName == "slash" and #data:getAllTargets() == 1 and
      not data:getAllTargets()[1]:isNude()
  end,
  on_cost = function(self, event, target, player, data)
    local choice=player.room:askForChoice(player, {"red", "black", "Cancel"}, self.name,
    "#zhuiming-invoke::"..data:getAllTargets()[1])
    event:setCostData(self,choice)
    return choice ~= "Cancel"
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local to = data:getAllTargets()[1]
    room:doIndicate(player.id, {to.id})
    room:sendLog{
      type = "#zhuiming",
      from = player.id,
      arg = event:getCostData(self),
      toast = true,
    }
    room:askForDiscard(to, 0, 999, true, self.name, true, nil, "#zhuiming-discard:"..player.id.."::"..self.cost_data, false)
    if player.dead or to.dead or to:isNude() then return end
    local id = room:askForCardChosen(player, to, "he", self.name)
    to:showCards({id})
    if Fk:getCardById(id):getColorString() == event:getCostData(self) then
      player:addCardUseHistory("slash", -1)
      data.disresponsive=true
      data.additionalDamage = (data.additionalDamage or 0) + 1
    end
  end,

})

return zhuiming